package com.ciwong.epaper.modules.evaluate.ui.dialogfragment.bean;

import android.support.annotation.DrawableRes;
import android.support.annotation.NonNull;

public class CheckReReadBean implements Comparable{
    private int id;
    private boolean clickable;
    private int resId;
    private int resIdHide;
    private String itemName;
    private boolean isGreater;

    private int flag;
    private int flagScore;


    /**
     *  @param id
     * @param clickable 是都是
     * @param resId 资源文件
     * @param resIdHide 资源文件（不可点击）
     * @param itemName 条目展示名称
     * @param isGreater 作为判断用（大于号或小于号）
     * @param flag 分数段标记
     * @param flagScore 本次作业最低分标记
     */
    public CheckReReadBean(int id, boolean clickable, @DrawableRes int resId, @DrawableRes int resIdHide, String itemName, boolean isGreater, int flag, int flagScore){
        this.id = id;
        this.clickable = clickable;
        this.resId = resId;
        this.resIdHide = resIdHide;
        this.itemName = itemName;
        this.isGreater = isGreater;
        this.flag = flag;
        this.flagScore = flagScore;
    }

    public boolean isGreater() {
        return isGreater;
    }
    public void setGreater(boolean greater) {
        isGreater = greater;
    }

    public boolean isClickable() {
        return clickable;
    }

    public void setClickable(boolean clickable) {
        this.clickable = clickable;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getResId() {
        return resId;
    }

    public void setResId(int resId) {
        this.resId = resId;
    }

    public String getItemName() {
        return itemName;
    }

    public void setItemName(String itemName) {
        this.itemName = itemName;
    }
    public int getResIdHide() {
        return resIdHide;
    }

    public void setResIdHide(int resIdHide) {
        this.resIdHide = resIdHide;
    }
    public int getFlag() {
        return flag;
    }

    public void setFlag(int flag) {
        this.flag = flag;
    }
    public int getFlagScore() {
        return flagScore;
    }

    public void setFlagScore(int flagScore) {
        this.flagScore = flagScore;
    }
    @Override
    public boolean equals(Object obj) {
        CheckReReadBean checkReReadBean=(CheckReReadBean)obj;
        return this.id==checkReReadBean.getId();
    }

    @Override
    public int compareTo(@NonNull Object o) {
        CheckReReadBean checkReReadBean=(CheckReReadBean)o;
        return this.flag>checkReReadBean.getFlag()?1:-1;
    }
}
